<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>匿名名插槽</title>
</head>
<body>
    <div id="app">
        <!-- 使用组件 -->
        <App></App>

    </div>
    <script src="vue.js"></script>
    <script>
        Vue.component('MBtn',{
            template:`
                <button>
                    <slot></slot>
                </button>
            `
        })
        const App={
            data(){
                return{
                    title:'老爹'
                }
            },
           
            template:`
                <div>
                   <m-btn>登录</m-btn>
                </div>
            `
        }
        new Vue({
            el:'#app',
            data:{

            },
            components:{
                App
            }
        })
    </script>
</body>
</html>